<!--加载全局布局文件-->
<% layout('layout')%>

<!--在这里编写你的代码-->
<div class="am-g am-g-collapse am-margin-xs">
    <a href="/classify/products"><div class="am-u-sm-4 am-text-center" style="background-color: #efb99e">新品</div></a>
    <a href="/classify/productsRm"><div class="am-u-sm-4 am-text-center"
                    style="border-left: 1px solid darkorange;border-right: 1px solid darkorange;
                    background-color: transparent">热卖</div></a>
    <a href="/classify/productsJg"><div class="am-u-sm-4 am-text-center" style="background-color: transparent">
            价格<i class="am-icon-arrow-up"></i></div></a>
</div>

<div data-am-widget="list_news" class="am-list-news am-list-news-default app-bg-white am-margin-0 am-padding-xs ng-cloak" ng-controller="ClassifyCtrl" ng-cloak>
    <div class="am-list-news-bd">
        <ul class="am-list">
            <% products.forEach(function(p){ %>
            <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left app-relative">
                <a ng-href="/detail/<%= p.id %>" class="am-block" >
                    <div class="am-u-sm-5">
                        <img src="<%= JSON.parse(p.get('picurlarray'))[0] %>" width="100%" height="100%" class="am-radius"/>
                    </div>
                    <div class="am-u-sm-7 am-list-main">
                        <h3 class="am-list-item-hd"><%= p.get('name') %></h3>
                        <span class="am-badge am-badge-primary am-radius"><i class="am-icon-tag"></i> <%= p.get('minSpecName') %></span>
                        <div class="am-list-item-text line-clamp"><%= p.get('intro') %></div>
                        <div class="am-text-default am-text-danger">￥<%= p.get('minPrice') %></div>
                        <div class="am-text-xs app-color-gray"><%= p.get('commentCount') %>人已评</div>

                    </div>
                </a>
                <button class="app-lsit-cart" ng-click='addToCart("<%= p.id%>","<%= p.get('minSpec')%>",1)'></button>
            </li>
            <% });%>
        </ul>
    </div>
</div>

<% include ../navbar.ejs %>
<% block('footer').append('<script src="'+CDN+'script/classify.js"></script>') %>











